<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<div id="toolbar_expertReview">
    <button id="btn_add_expertReview" type="button" style="margin-left: 5px" class="btn btn-default"><span
            class="glyphicon glyphicon-plus-sign"></span>&nbsp;添加&nbsp;
    </button>
</div>
<table id="table_expertReview"></table>
<script>
    var $table_expertReview = $('#table_expertReview');
    $table_expertReview.bootstrapTable({
        data:${data},
        striped: true,
        height: 370,
        search: true,
        searchOnEnterKey: false,
        toolbar: "#toolbar_expertReview",
        toolbarAlign: 'right',
        columns: [
            {
                formatter: function (value, row, index) {
                    return index + 1;
                }
            },
            {

                field: 'startTime',
                title: '开始时间',
                formatter: function (value, row, index) {
                    return $.Helper.dataTimeHelper.int2DateString(value)
                }
            }, {

                field: 'endTime',
                title: '结束时间',
                formatter: function (value, row, index) {
                    return $.Helper.dataTimeHelper.int2DateString(value)
                }
            },
            {

                field: 'company',
                title: '涉及企业'
            },
            {

                width: 300,
                field: 'product',
                title: '涉及专业/产品'

            },
            {
                field: 'role',
                title: '组长/组员',
                formatter: function (value, row, index) {
                    return $.sysPlugin.ifElse(value, $.sysPlugin.enumeration.leaderCrew)
                }
            }
            ,
            {

                title: '操作',
                events: 'events',
                formatter: function (value, row, index) {

                    if (row.crudType==1){
                        return [
                            '<div class="btn-group btn-group-xs" role="group" >'
                            + '<button type="button" class="btn btn-xs btn-default update_expertReview">' +
                            '<span class="glyphicon glyphicon-edit  "></span> 修改' +
                            '</button>'
                            + '<button type="button" class="btn btn-xs btn-default delete_expertReview">' +
                            '<span class="glyphicon glyphicon-remove"></span> 删除' +
                            '</button>'
                            + '</div>'
                        ].join('');
                    }else {
                        return [
                            '<button type="button" class="btn btn-xs btn-default btn-danger cancel_expertReview">' +
                            '<span class="glyphicon glyphicon-remove"></span> 撤销' +
                            '</button>'
                        ].join('');
                    }

                }
            }
        ]
    });


    $("#btn_add_expertReview").click(function () {
        $('#modal_ajax').modal({
            backdrop: 'static',
            keyboard: false,
            show: true,
            remote: 'expertInfo/expertEdit/expertReview/editDlg'
        });
    });

</script>

